home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / desaware / verstamp / vervrfy2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-03-22  |  5.6 KB  |  166 lines

  1. VERSION 4.00
  2. Begin VB.Form VerVrfy2 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "Version Verify"
  7.    ClientHeight    =   4875
  8.    ClientLeft      =   1965
  9.    ClientTop       =   1890
  10.    ClientWidth     =   6165
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   1
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   5280
  22.    Icon            =   "VERVRFY2.frx":0000
  23.    Left            =   1905
  24.    LinkTopic       =   "Form1"
  25.    MaxButton       =   0   'False
  26.    ScaleHeight     =   4875
  27.    ScaleWidth      =   6165
  28.    Top             =   1545
  29.    Width           =   6285
  30.    Begin VB.CommandButton ExitBut 
  31.       Appearance      =   0  'Flat
  32.       BackColor       =   &H80000005&
  33.       Caption         =   "Exit"
  34.       Height          =   375
  35.       Left            =   4830
  36.       TabIndex        =   4
  37.       Top             =   1140
  38.       Width           =   1275
  39.    End
  40.    Begin VB.TextBox DetailText 
  41.       Appearance      =   0  'Flat
  42.       BackColor       =   &H00C0C0C0&
  43.       Height          =   2895
  44.       Left            =   120
  45.       MultiLine       =   -1  'True
  46.       ScrollBars      =   2  'Vertical
  47.       TabIndex        =   3
  48.       Top             =   1890
  49.       Width           =   5955
  50.    End
  51.    Begin VB.ListBox ConflictListBox 
  52.       Appearance      =   0  'Flat
  53.       Height          =   1005
  54.       Left            =   120
  55.       TabIndex        =   1
  56.       Top             =   480
  57.       Width           =   4005
  58.    End
  59.    Begin VerstampLibDemoCtl.VersionStampDemo VersionStamper1 
  60.       Left            =   5610
  61.       Top             =   630
  62.       _version        =   262144
  63.       _extentx        =   847
  64.       _extenty        =   847
  65.       _stockprops     =   0
  66.       selectfiles     =   "VERVRFY2.frx":030A
  67.       selectfiles32   =   "VERVRFY2.frx":0320
  68.       verifymode      =   0
  69.       readproperrors  =   0   'False
  70.       slave           =   -1  'True
  71.       delay           =   0   'False
  72.       filefilterext   =   ""
  73.       otherpaths      =   ""
  74.       pathfilter      =   6
  75.       filefilter      =   3
  76.    End
  77.    Begin VB.Label Label2 
  78.       Appearance      =   0  'Flat
  79.       BackColor       =   &H00C0C0C0&
  80.       Caption         =   "Detail description of incompatibilities"
  81.       ForeColor       =   &H80000008&
  82.       Height          =   195
  83.       Left            =   120
  84.       TabIndex        =   2
  85.       Top             =   1590
  86.       Width           =   5955
  87.    End
  88.    Begin VB.Label Label1 
  89.       Appearance      =   0  'Flat
  90.       BackColor       =   &H00C0C0C0&
  91.       Caption         =   "&Incompatible Files"
  92.       ForeColor       =   &H80000008&
  93.       Height          =   195
  94.       Left            =   120
  95.       TabIndex        =   0
  96.       Top             =   180
  97.       Width           =   1575
  98.    End
  99. Attribute VB_Name = "VerVrfy2"
  100. Attribute VB_Creatable = False
  101. Attribute VB_Exposed = False
  102. Option Explicit
  103. #If Win32 Then
  104.     Dim ListBoxTabs(3) As Long
  105.     Dim TextBoxTabs(3) As Long
  106. #Else
  107.     Dim ListBoxTabs(3) As Integer
  108.     Dim TextBoxTabs(3) As Integer
  109. #End If
  110. Private Sub ConflictListBox_Click()
  111. Dim Index%
  112. Dim tstr$
  113.     'get index to selected list item
  114.     Index% = ConflictListBox.ListIndex
  115.     If Index% = -1 Then Exit Sub
  116.     Index% = Index% + 1 'index to array begins at 1
  117.     ' Get more information about each conflict.
  118.     tstr$ = GetDetailConflictInfo(Index%)
  119.     ' Place detail information about each conflict in a text box.
  120.     DetailText.Text = tstr$
  121. End Sub
  122. Private Sub ExitBut_Click()
  123.     Unload Me
  124. End Sub
  125. Private Sub Form_Load()
  126. Dim lres As Long
  127.     NL = Chr$(13) & Chr$(10)
  128.     TB = Chr$(9)
  129.     'set tabs
  130.     ListBoxTabs(0) = 16 * 4
  131.     ListBoxTabs(1) = ListBoxTabs(0) + 16 * 4
  132.     ListBoxTabs(2) = ListBoxTabs(1) + 16 * 4
  133.     TextBoxTabs(0) = 22 * 4
  134.     TextBoxTabs(1) = TextBoxTabs(0) + 22 * 4
  135.     TextBoxTabs(2) = TextBoxTabs(1) + 22 * 4
  136.     ' Handle the monochrome case by going black on white
  137.     If GetColorCount(Me) = 2 Then
  138.         BackColor = QBColor(15)
  139.         DetailText.BackColor = BackColor
  140.     End If
  141.     'set text box to read only
  142.     lres = SendMessageByNum(DetailText.hWnd, EM_SETREADONLY, True, 0&)
  143.     StartVerify VersionStamper1
  144.     FillConflictFileListBox False, ConflictListBox
  145. End Sub
  146. Private Sub Form_Resize()
  147. Dim lres As Long
  148.     ' Set the tab stops in the list box
  149.     lres = SendMessage(ConflictListBox.hWnd, LB_SETTABSTOPS, 3, ListBoxTabs(0))
  150.     ' Set identical tab stops in the text box
  151.     lres = SendMessage(DetailText.hWnd, EM_SETTABSTOPS, 3, TextBoxTabs(0))
  152. End Sub
  153. Private Sub VersionStamper1_EnumComplete()
  154.     LogEnumComplete VersionStamper1
  155. End Sub
  156. ' This event is triggered for each file that contained
  157. ' a conflict with the embedded file.
  158. Private Sub VersionStamper1_FileConflict(ReferenceFile As String, FoundFile As String, flags As Long, StopVerify As Integer)
  159.     LogFileConflict ReferenceFile, FoundFile, flags, StopVerify, VersionStamper1
  160. End Sub
  161. Private Sub VersionStamper1_FileScan(ReferenceFile As String, VerifyFlags As Long, StopScan As Integer)
  162.     'Since all we need to do is make sure at least one file was found
  163.     '(which tells us this EXE has embedded information), we can halt the scan.
  164.     StopFileScan ReferenceFile, VerifyFlags, StopScan
  165. End Sub
  166.